﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ include file="/common/common.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/cases/assit/";  //应用的地址名
String listActionName = basePath+"CaseEntrustCheck.action?op=searchjs";
String addActionName = basePath+"CaseEntrustCheck_add.action";
String editActionName = basePath+"CaseEntrustCheck_modify.action";
String delActionName = basePath+"CaseEntrustCheck_del.action?op=deljs";

String replyRegActionName = basePath+"CaseEntrustCheck_replyRegPage.action";
String inRegActionName = basePath+"CaseEntrustCheck_inRegPage.action";
String excelActionName=basePath+"CaseEntrustCheck_saExcel.action";
%>
<script type="text/javascript">
    		$(function(){
			//表格初始化
			$('#searchTable').grid({
				title:[<ce:menu/>],
				url:'<%=listActionName%>',
				queryParams:{
					"search.assitType":"",
					"search.entrstCode":"",
					"search.entrstDept":"",
					"search.collectDept":"",
					"search.entrstDept":"",
					"search.enterpriceName":"",
					"search.regBeginDate":"",
					"search.regEndDate":""
					},  //用于查询的参数以及初始值
				//表头列，不建议改动
				frozenColumns:[[   
	                {field:'ck',checkbox:true},
	                {field:'entrustDept',title:'委托单位',width:80,sortable:true},
					{field:'collectionDept',title:'所属征管局',width:80,sortable:true},
					{field:'entrustCode',title:'委托协查函号',width:80,sortable:true},

					{field:'startDept',title:'发起协查单位及部门',width:120,sortable:true},
					{field:'assitReason',title:'协查事由',width:120},

					{field:'assitTypeName',title:'协查类型',width:80,sortable:true},
					{field:'registerDate',title:'登记日期',width:80,sortable:true},
					{field:'isCity',title:'是否市<br>内协查',width:80,sortable:true,
						formatter : function(value) {
							if (value == '0') {
								return "否";
							} else if (value == '1') {
								return "是";
							}
						}
					},					
					
				]],
				//数据列，根据显示的内容进行修改
				columns:[
				        [{title:'委托发出情况',colspan:4},
				         {field:'assitTax',title:'受托税务机关',width:100,sortable:true,rowspan:2},
						 {field:'replyLimitDate',title:'回复时限',width:80,sortable:true,rowspan:2},
						 {field:'replyDate',title:'回复时间',width:80,sortable:true,rowspan:2},
						 {field:'ontimeReply',title:'是否按期回复',width:80,sortable:true,rowspan:2},
						 {title:'回复发票情况',colspan:4},
						 {field:'ontimeReply',title:'是否按期回复',width:80,sortable:true,rowspan:2,
								formatter : function(value) {
									if (value == '0') {
										return "否";
									} else if (value == '1') {
										return "是";
									}
								}
							},
							{field:'ontimeReply1',title:'是否转立案查处',width:100,sortable:true,rowspan:2,
								formatter : function(value) {
									if (value == '0') {
										return "否";
									} else if (value == '1') {
										return "是";
									}
								}
							},
						 {title:'受托查处情况',colspan:4},
						 {title:'受托查处入库情况',colspan:4},
							{field:'passJudiciary',title:'是否移送司法机关',width:120,sortable:true,rowspan:2,
								formatter : function(value) {
									if (value == '0') {
										return "否";
									} else if (value == '1') {
										return "是";
									}
								}
							}
				        ],
				        [  
                        {field:'involvedEnterprice',title:'涉及企业名称',width:100,sortable:true},
						{field:'billCount',title:'发票份数',width:80},
						{field:'amountMoney',title:'金额',width:60},
						{field:'taxMoney',title:'税额',width:60},
						
						{field:'totalBill',title:'累计回复发票份数',width:120},
						{field:'isNormal',title:'正常',width:60,sortable:true,
							formatter : function(value) {
								if (value == '0') {
									return "否";
								} else if (value == '1') {
									return "是";
								}
							}
						},
						{field:'problemBill',title:'有问题的发票份数',width:120},
						{field:'noVerify',title:'无法核实',width:80},
						
						{field:'checkCounts',title:'查补数合计',width:80},
						{field:'checkTax',title:'查补税款',width:80},
						{field:'checkFine',title:'查补罚款',width:80},
						{field:'checkLatefees',title:'查补滞纳金',width:80},
						
						{field:'inCounts',title:'入库数合计',width:80},
						{field:'inTax',title:'入库税款',width:80},
						{field:'inFine',title:'入库罚款',width:80},
						{field:'inLatefees',title:'入库滞纳金',width:80}
				]],
				//功能按钮组
                toolbar:[<ce:jsonBtn/>]
			});
			//查询操作
			$('#search').click(function(){
                defaultSearchAction();
            });		
		});	
		
		
   		    //点击添加按钮后的操作：打开添加界面
         function openAddPage(){
               //默认的打开添加界面操作(添加页面地址，窗口宽度，窗口高度)
               defaultOpenAddPageHavebtn('<%=addActionName%>',650,400);
   		}
   		//点击编辑按钮后的操作：打开编辑界面
   		function openModifyPage(){
   		    //默认的打开编辑界面操作（编辑页面地址，窗口宽度，窗口高度）
               defaultOpenModifyPageHavebtn('<%=editActionName%>',650,400);
   		}
   	     //删除数据操作
		function deleteItems(){
            defaultDeleteItems('<%=delActionName%>');
		}
   		
        function replyReg(){
        	defaultOpenDealPageHavebtn('<%=replyRegActionName%>',600,300,null,'回复情况');   
        }
        
        function inReg(){
        	defaultOpenDealPageHavebtn('<%=inRegActionName%>',600,300,null,'入库情况');   
        }
        function saveAsExcel(){
       	   if($('#saveExcelFrm').length==0){
       			$('<iframe id="saveExcelFrm" name="saveExcelFrm" width=0 height=0></iframe>').appendTo(document.body);
       		}
       		var f = $('form:first');
       		var fa = f.attr('action');
       		f.attr('target','saveExcelFrm');
       		f.attr('action','<%=excelActionName%>');
       		f[0].submit();
       		f.attr('target','');
       		f.attr('action',fa);
           }
    
    </script>
<html>
  <head>
    <title></title>
  </head> 
  <script language="javascript" src="<%=path %>/js/My97/WdatePicker.js"></script>
<body class="easyui-layout">
<form id="excelSearch">
<div class="div_height_auto" data-options="region:'north',border:false" style="overflow: hidden;" align="left">
	<table>
	<tr>
		<td align="right">协查类型：</td><td><ce:dictSelect name="search.assitType" id="assitType"  dictName="协查管理-协查类型" allOption="true" style="width:100px;"/></td>
		<td align="right">委托协查函号：</td><td><input type="text" name="search.entrstCode" id="entrstCode"  style="width:100px;"/></td>
		<td align="right">委托单位：</td><td><input type="text"  name="search.entrstDept" id="entrstDept"  style="width:100px;"/></td>
		<td align="right">所属征管局：</td><td><input type="text"  name="search.collectDept" id="collectDept"  style="width:100px;"/></td>
		<td></td>
	</tr>
	<tr>
	    <td align="right">企业名称：</td><td><input type="text"  name="search.enterpriceName" id="enterpriceName"  style="width:100px;"/></td>
		<td align="right">登记日期：</td>
		<td colspan="5"><input type="text"  name="search.regBeginDate" id="regBeginDate" style="width:100px;" class="Wdate" onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd'})" readonly="true"/>&nbsp;至&nbsp;
		    <input type="text"  name="search.regEndDate"  id="regEndDate"  style="width:100px;"  class="Wdate" onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd'})" readonly="true"/>
		</td>
		<td rowspan="2">
		   <a id="search" href="javascript:void(0)"  class="easyui-linkbutton" iconCls="icon-search">查询</a>
		   <a id="resetSearch" href="javascript:void(0)"  class="easyui-linkbutton" iconCls="icon-redo">重置</a>
		</td>
	</tr>
	</table>
	</div>
<div data-options="region:'center',border:false" style="overflow: hidden;">
  <table id="searchTable"></table>
</div>
</form>
</body>
</html>
   
   

